package com.lds.register.center.common.model.appinstance.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Accessors(chain = true)
public class AppInstanceBaseResponse implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 应用实例ID
     */
    private Long id;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 修改人
     */
    private String modifier;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * IP
     */
    private String ip;

    /**
     * 端口
     */
    private Integer port;

    /**
     * 健康状态 1:健康 0:不健康
     */
    private Boolean healthy;

    /**
     * 应用ID
     */
    private Long appId;

    /**
     * 权重
     */
    private Integer weight;

    /**
     * 启用状态 1:启用 2:停用
     */
    private Boolean enabled;
}
